<?php
  require_once('./class_timer.php');

  $time1 = new Timer();

  $a = 0;

  $time1->go();
  for($i=0;$i<1000000;$i++){
    $a += $i;
  }
  $time1->stop();

  $a = 0;

  $time1->new_lap_and_go();
  for($i=0;$i<1000000;++$i){
    $a += $i;
  }
  $time1->stop();

  $a = 0;

  $time1->new_lap();
  for($i=0;$i<10;$i++){
    if($i%2 == 1){
      $time1->go();
      $a += $i;
      $time1->stop();   
    }
  }

//  $time_integrity = new Timer();
//  $time_integrity->go();
//  $time1->check_integrity();
//  $time_integrity->stop();
//  $res = $time_integrity->get_sum_lap();
//  print_r($res);
//  print_r($time1);


  $res = $time1->get_sum_lap();
  print_r($res);
  $res = $time1->get_sum_lap_detail();
  print_r($res);

  print "average :: ".$time1->get_average();

?>
